﻿Public Class RandomNumberProvider
    Private Shared RandomProvider As New Random()

    Public Shared Function GetRandomNumber(ByVal minValue As Integer, ByVal maxValue As Integer) As Integer
        Return RandomProvider.Next(minValue, maxValue + 1)
    End Function

    Public Shared Function CheckIfChanceOccurs(ByVal percentChance As Integer) As Boolean
        Dim outcome As Integer = GetRandomNumber(0, 100)
        If (outcome <= percentChance) Then
            Return True
        Else
            Return False
        End If
    End Function
End Class
